﻿<%@ Page Language="C#" MasterPageFile="~/masDefault.master" AutoEventWireup="true" CodeFile="ContactUs.aspx.cs" Inherits="ContactUS" %>

<%@ Import Namespace="CommonTagTime" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="Server">
    <script src="scripts/common.js" type="text/javascript"></script>
    <script type="text/javascript" src="scripts/jquery.min.js"></script>
    <script type="text/javascript" src="scripts/jquery.maskedinput-1.2.2.js"></script>
    <div id="contactForm">
        <h1>
            <%=GetLang("Email") %>
        </h1>
        <div class="box-content2">
        <table class="contactUSForm">
            <tr>
                <td></td>
                <td><span class="commentRequireInputText"><asp:Literal ID="ltrError" runat="server"></asp:Literal></span></td>
            </tr>
            <tr>
                <td class="contactUSFormLabel" >
                    <%=GetLang("Name") %>  <span class="commentRequireInputText">*</span>:
                </td>
                <td class="contactUSFormControl">
                    <asp:TextBox ID="txtFirstName" MaxLength="50" runat="server" CssClass="txt txtContactFirstName"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="reqFirstName" runat="server" EnableClientScript="true"
                        SetFocusOnError="true" CssClass="errorMessage" ErrorMessage="required"
                        Display="Dynamic" ControlToValidate="txtFirstName"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="contactUSFormLabel">
                    <%=GetLang("Email") %> <span class="commentRequireInputText">*</span>:
                </td>
                <td class="contactUSFormControl">
                    <asp:TextBox ID="txtEmail" runat="server" MaxLength="256" CssClass="txt txtContactEmail"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="reqEmail" runat="server" EnableClientScript="true"
                        SetFocusOnError="true" CssClass="errorMessage" ErrorMessage="required"
                        Display="Dynamic" ControlToValidate="txtEmail"></asp:RequiredFieldValidator>
                    <asp:CustomValidator ID="cusEmail" CssClass="errorMessage" runat="server" EnableClientScript="true"
                        Display="Dynamic" ErrorMessage="invalid" OnServerValidate="CheckSEmail"
                        SetFocusOnError="true" ClientValidationFunction="CheckCEmail" ControlToValidate="txtEmail"></asp:CustomValidator>
                </td>
            </tr>
            <tr>
                <td class="contactUSFormLabel">
                    <%=GetLang("Phone") %>:
                </td>
                <td class="contactUSFormControl">
                    <asp:TextBox ID="txtDaytimePhone" runat="server" CssClass="txt txtDaytimePhone"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="contactUSFormLabel">
                    <%=GetLang("Comment") %> <span class="commentRequireInputText">*</span>:
                </td>
                <td class="contactUSFormControl">
                    <asp:TextBox ID="txtComment" runat="server" MaxLength="500" CssClass="txt txtComment"
                        TextMode="MultiLine"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="reqComment" runat="server" EnableClientScript="true"
                        SetFocusOnError="true" CssClass="errorMessage" ErrorMessage="required"
                        Display="Dynamic" ControlToValidate="txtComment"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="contactUSFormLabel">
                    &nbsp;
                </td>
                <td class="contactUSFormControl">
                    <asp:Button ID="btnSubmit" CssClass="btn" runat="server" Text="Send" CausesValidation="true" onclick="btnSubmit_Click" />
                    <asp:Button ID="btnReset" runat="server" Visible="false" Text="Reset" CssClass="btn" OnClientClick="return Reset();"  CausesValidation="false" />
                </td>
            </tr>
        </table>
        </div>
    </div>
    <div class="clear">&nbsp;</div>

    <script type="text/javascript">
        function CheckCPhone(oSrc, args) {

            args.IsValid = CheckPhoneValid(args.Value);
        }
        function CheckCEmail(oSrc, args) {

            args.IsValid = CheckEmailValid(args.Value);

        }
        function Reset() {
            document.getElementById('<%=txtFirstName.ClientID %>').value = '';
            document.getElementById('<%=txtEmail.ClientID %>').value = '';
            document.getElementById('<%=txtDaytimePhone.ClientID %>').value = '';
            document.getElementById('<%=txtComment.ClientID %>').value = '';
            return false;
        }
         
    </script>
</asp:Content>
